package com.naiterui.ehp.bs.cms.modules.oms.feign;

import java.util.Set;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.naiterui.ehp.bp.bo.b2c.order.RefundOrderBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

@RequestMapping("/inner/refund")
@FeignClient(name = "refund", url = "${ehp.domain.b2c}", configuration = FeignConfiguration.class)
public interface IRefundOrderFeignClient {

    @DeleteMapping("/{refundOrderId}")
    void del(@PathVariable("refundOrderId") Long refundOrderId) throws BusinessException;

    @PostMapping("/audit")
    void audit(@RequestBody Set<Long> refundOrderIds) throws BusinessException;

    @PostMapping("/reverseAudit")
    void reverseAudit(@RequestBody Set<Long> refundOrderIds) throws BusinessException;

    @PostMapping("/pay")
    void pay(@RequestBody Set<Long> refundOrderIds) throws BusinessException;

    @PostMapping("/invalid")
    void invalid(@RequestBody Set<Long> refundOrderIds) throws BusinessException;

    @PutMapping("/submit")
    void submit(@RequestBody Set<Long> refundOrderIds) throws BusinessException;

    @PostMapping("{submit}")
    void update(@RequestBody RefundOrderBO refundOrderBO, @PathVariable("submit") Integer submit) throws BusinessException;

}
